Optimal. Leaf size=108 \[ -\frac{3 i a^3 \cot ^3(c+d x)}{4 d}+\frac{2 a^3 \cot ^2(c+d x)}{d}+\frac{4 i a^3 \cot (c+d x)}{d}+\frac{4 a^3 \log (\sin (c+d x))}{d}-\frac{\cot ^4(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{4 d}+4 i a^3 x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.187054, antiderivative size = 108, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.208, Rules used = {3553, 3591, 3529, 3531, 3475} \[ -\frac{3 i a^3 \cot ^3(c+d x)}{4 d}+\frac{2 a^3 \cot ^2(c+d x)}{d}+\frac{4 i a^3 \cot (c+d x)}{d}+\frac{4 a^3 \log (\sin (c+d x))}{d}-\frac{\cot ^4(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{4 d}+4 i a^3 x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3553
Rule 3591
Rule 3529
Rule 3531
Rule 3475
Rubi steps
\begin{align*} \int \cot ^5(c+d x) (a+i a \tan (c+d x))^3 \, dx &=-\frac{\cot ^4(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{4 d}-\frac{1}{4} \int \cot ^4(c+d x) (a+i a \tan (c+d x)) \left (-9 i a^2+7 a^2 \tan (c+d x)\right ) \, dx\\ &=-\frac{3 i a^3 \cot ^3(c+d x)}{4 d}-\frac{\cot ^4(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{4 d}-\frac{1}{4} \int \cot ^3(c+d x) \left (16 a^3+16 i a^3 \tan (c+d x)\right ) \, dx\\ &=\frac{2 a^3 \cot ^2(c+d x)}{d}-\frac{3 i a^3 \cot ^3(c+d x)}{4 d}-\frac{\cot ^4(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{4 d}-\frac{1}{4} \int \cot ^2(c+d x) \left (16 i a^3-16 a^3 \tan (c+d x)\right ) \, dx\\ &=\frac{4 i a^3 \cot (c+d x)}{d}+\frac{2 a^3 \cot ^2(c+d x)}{d}-\frac{3 i a^3 \cot ^3(c+d x)}{4 d}-\frac{\cot ^4(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{4 d}-\frac{1}{4} \int \cot (c+d x) \left (-16 a^3-16 i a^3 \tan (c+d x)\right ) \, dx\\ &=4 i a^3 x+\frac{4 i a^3 \cot (c+d x)}{d}+\frac{2 a^3 \cot ^2(c+d x)}{d}-\frac{3 i a^3 \cot ^3(c+d x)}{4 d}-\frac{\cot ^4(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{4 d}+\left (4 a^3\right ) \int \cot (c+d x) \, dx\\ &=4 i a^3 x+\frac{4 i a^3 \cot (c+d x)}{d}+\frac{2 a^3 \cot ^2(c+d x)}{d}-\frac{3 i a^3 \cot ^3(c+d x)}{4 d}+\frac{4 a^3 \log (\sin (c+d x))}{d}-\frac{\cot ^4(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{4 d}\\ \end{align*}
Mathematica [B] time = 1.34101, size = 254, normalized size = 2.35 \[ \frac{a^3 \csc \left (\frac{c}{2}\right ) \sec \left (\frac{c}{2}\right ) \csc ^4(c+d x) \left (12 i d x \sin (c)+8 i d x \sin (c+2 d x)+5 \sin (c+2 d x)-8 i d x \sin (3 c+2 d x)-5 \sin (3 c+2 d x)-2 i d x \sin (3 c+4 d x)+2 i d x \sin (5 c+4 d x)+13 i \cos (c+2 d x)+7 i \cos (3 c+2 d x)-5 i \cos (3 c+4 d x)+6 \sin (c) \log \left (\sin ^2(c+d x)\right )+4 \sin (c+2 d x) \log \left (\sin ^2(c+d x)\right )-4 \sin (3 c+2 d x) \log \left (\sin ^2(c+d x)\right )-\sin (3 c+4 d x) \log \left (\sin ^2(c+d x)\right )+\sin (5 c+4 d x) \log \left (\sin ^2(c+d x)\right )+8 \sin (c)-15 i \cos (c)\right )}{16 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.053, size = 98, normalized size = 0.9 \begin{align*} 4\,i{a}^{3}x+{\frac{4\,i{a}^{3}\cot \left ( dx+c \right ) }{d}}+{\frac{4\,i{a}^{3}c}{d}}+2\,{\frac{{a}^{3} \left ( \cot \left ( dx+c \right ) \right ) ^{2}}{d}}+4\,{\frac{{a}^{3}\ln \left ( \sin \left ( dx+c \right ) \right ) }{d}}-{\frac{i{a}^{3} \left ( \cot \left ( dx+c \right ) \right ) ^{3}}{d}}-{\frac{{a}^{3} \left ( \cot \left ( dx+c \right ) \right ) ^{4}}{4\,d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 2.21579, size = 127, normalized size = 1.18 \begin{align*} -\frac{-16 i \,{\left (d x + c\right )} a^{3} + 8 \, a^{3} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) - 16 \, a^{3} \log \left (\tan \left (d x + c\right )\right ) + \frac{-16 i \, a^{3} \tan \left (d x + c\right )^{3} - 8 \, a^{3} \tan \left (d x + c\right )^{2} + 4 i \, a^{3} \tan \left (d x + c\right ) + a^{3}}{\tan \left (d x + c\right )^{4}}}{4 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.14402, size = 478, normalized size = 4.43 \begin{align*} -\frac{2 \,{\left (12 \, a^{3} e^{\left (6 i \, d x + 6 i \, c\right )} - 23 \, a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} + 18 \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} - 5 \, a^{3} - 2 \,{\left (a^{3} e^{\left (8 i \, d x + 8 i \, c\right )} - 4 \, a^{3} e^{\left (6 i \, d x + 6 i \, c\right )} + 6 \, a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} - 4 \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + a^{3}\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} - 1\right )\right )}}{d e^{\left (8 i \, d x + 8 i \, c\right )} - 4 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 6 \, d e^{\left (4 i \, d x + 4 i \, c\right )} - 4 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 4.50298, size = 172, normalized size = 1.59 \begin{align*} \frac{4 a^{3} \log{\left (e^{2 i d x} - e^{- 2 i c} \right )}}{d} + \frac{- \frac{24 a^{3} e^{- 2 i c} e^{6 i d x}}{d} + \frac{46 a^{3} e^{- 4 i c} e^{4 i d x}}{d} - \frac{36 a^{3} e^{- 6 i c} e^{2 i d x}}{d} + \frac{10 a^{3} e^{- 8 i c}}{d}}{e^{8 i d x} - 4 e^{- 2 i c} e^{6 i d x} + 6 e^{- 4 i c} e^{4 i d x} - 4 e^{- 6 i c} e^{2 i d x} + e^{- 8 i c}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.53129, size = 244, normalized size = 2.26 \begin{align*} -\frac{3 \, a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} - 24 i \, a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 108 \, a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 1536 \, a^{3} \log \left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + i\right ) - 768 \, a^{3} \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) \right |}\right ) + 456 i \, a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + \frac{1600 \, a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} - 456 i \, a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 108 \, a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 24 i \, a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 3 \, a^{3}}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4}}}{192 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]